# -*- coding:utf8 -*-
import matplotlib
import matplotlib.pyplot as plt
import numpy as np

matplotlib.use('TkAgg')

loss1 = np.loadtxt("llama_drop.loss")
loss2 = np.loadtxt("llama_bias.loss")
steps = min(loss1.shape[0], loss2.shape[0])
iterations = [i for i in range(0, steps, 2)]
print(steps, loss1[:steps, 1], loss2[:steps, 1])
plt.figure(figsize=(10, 6))
plt.plot(loss1[:steps, 1], label='llama_drop')
plt.plot(loss2[:steps, 1], label='llama_bias')
# plt.plot(loss1[:steps], loss2[:steps, 1], label='llama_bias')
plt.xlabel('step')
plt.ylabel('loss')
plt.title('loss info')
plt.legend()
plt.grid(True)
plt.show()
